﻿using System.ComponentModel;

namespace LogManager.Base.Models.Event.Filter
{
    /// <summary>
    /// Filter a event by standard properties on the event itself
    /// If properties are not set they will not be filtered
    /// </summary>
    public class EventSimplePropertiesFilter : IEventSimpleProperties
    {
        public EventSimplePropertiesFilter()
        {

        }

        /// <summary>
        /// Create new event filter
        /// </summary>
        /// <param name="user">Username to filter</param>
        /// <param name="level">Level to filter</param>
        public EventSimplePropertiesFilter(string user, string level)
        {
            User = user;
            Level = level;
        }

        /// <summary>
        /// User of the event
        /// </summary>
        [DisplayName("User")]
        public string User { get; set; }
        
        /// <summary>
        /// Level of the event
        /// </summary>
        [DisplayName("Level")]
        public string Level { get; set; }
    }
}